package breeze.pixel.weather.adapter;

public class AppWeatherManager {

    private static int DEFAULT_HELPER_ID = 1;

    public static IAppWeatherHelper getHelper() {
        return WeatherHelperFactory.getWeatherHelper(DEFAULT_HELPER_ID);
    }

    protected static class WeatherHelperFactory {

        private static final int HEFENG = 1;

        /**
         * 获取天气助手
         * @param id
         * @return
         */
        public static IAppWeatherHelper getWeatherHelper(int id) {
            switch (id) {
                case HEFENG:
                    return new HeFengWeatherAPI();
                default:
                    return getWeatherHelper(HEFENG);
            }
        }
    }

}
